<? $page_title='质检确认' ?>
<?include "FASHION/page_header.phtml"?>

<table border="0" class="list"><tbody>
<tr class="nobg">
	<th>入库单号</th>
	<th>入库时间</th>
	<th>采购订单</th>
</tr>
<tr>
	<td><?$inbound.sno?></td>
	<td class="nowrap"><?=date('Y/m/d H:i', $inbound.addtime)?></td>
	<td class="nowrap"><a href="<?url("indent-view/id/". $inbound.indent_id)?>" title="查看采购订单"><? $inbound.indent_sno ?></a></td>
</tr>
</tbody></table>

<table border="0" class="list">
<tbody>
<tr class="nobg">
	<th>编号</th>
	<th>材料名称</th>
	<th>品牌</th>
	<th>规格</th>
	<th>单位</th>
	<th>数量</th>
	<th>单价</th>
	<th>金额</th>
	<th width="12%">备注</th>
</tr>
<? $amount = 0; ?>
<{foreach item=ware from=$inbound.items}>
	<tr id="selstf_<{$ware.id}>">
		<td><{$ware.sno}></td>
		<td><{$ware.name}></td>
		<td><{$ware.brand}></td>
		<td><{$ware.specific}></td>
		<td><{$ware.unit}></td>
		<td><div class="decimal"><{$ware.amount}></div></td>
		<td><div class="decimal fnum"><{$ware.price}></div></td>
		<td><div class="decimal fnum"><{= $ware.price * $ware.amount}></div></td>
		<td><div class="text"><{= $ware.remark}></div></td>
	</tr>
	<? $amount += $ware.amount ?>
<{/foreach}>
	<tr class="hl">
		<td>小计</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td><div class="decimal"><? $amount ?></div></td>
		<td>&nbsp;</td>
		<td><div class="decimal fnum"><? $inbound.total ?></div></td>
		<td>&nbsp;</td>
	</tr>
</tbody></table>

<table border="0" class="list">
<caption>质检人</caption>
<tbody>
<tr class="nobg">
	<th>质检人</th>
	<th width="130">时间</th>
	<th>追踪</th>
</tr>
<{foreach item=rev from=$reviewers}>
	<tr>
		<td><{$rev.user_name}></td>
	<{if $rev.pass!=0}>
		<td><{= date('Y-m-d H:i', $rev.addtime)}></td>
		<td><{$rev.track}></td>
	<{else}>
		<td></td>
		<td></td>
	<{/if}>
	</tr>
<{/foreach}>
</tbody></table>

<form method="post" id="form1">
<br/>
<div class="center">
<input type="button" value="返回" onclick="gback();" /> &nbsp; 

<{foreach item=rv from=$reviewers }>
  <{if $rv.user_id == $uid}>
	<input type="submit" <{if $rv.pass>0 }> value="已确认" disabled<{else}> value="质检确认"<{/if}> />
	<{break;}>
  <{/if}>
<{/foreach}>

</div>
</form>

<script>
ajax_form({before:function(){ return confirm('提交质检？');}, success:function(){ location.reload(); }});
</script>

<?include "FASHION/page_footer.phtml"?>